package com.mybatispuls.springboot.controller;

import com.mybatispuls.springboot.Utils.R;
import com.mybatispuls.springboot.service.impl.OssServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;


@RestController
@CrossOrigin
@RequestMapping("/eduoss/file")
public class Ossontroller {

    @Autowired
    private OssServiceImpl ossService;

    @PostMapping("uploadossfile")
    public R uploadossfile(MultipartFile file){
        String uplotdfile = ossService.uplotdfile(file);
        return R.ok().data("uplotdfile",uplotdfile);
    }
}
